<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<%@ include file="/mete.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.2.min.js"></script>
<script src='${pageContext.request.contextPath }/js/validator/validator.js' type='text/javascript'></script>
</head>
<body>
	<div class="meijieContent">
		<div class="myform app_info">
		<form action="${pageContext.request.contextPath }/tank!add.do" class="form-horizontal n-validator n-yellow" id="frmApp" method="post" role="form">
			<h2>新增网点</h2>
			<ul>
            <table>
               <tr>
                    <td class="colname"><span class="warn">*</span>所属站点:</td>
                    <td class="content">
						<select id="gasstation_id" name="GASSTATION_ID">
							
						</select>
					</td>
               </tr>
              <tr>
                    <td class="colname"><span class="warn">*</span>油罐编号:</td>
                    <td class="content"><input class="txt" id="tank_num" name="TANK_NUM" placeholder="请输入油罐编号" type="text"/></td>
               </tr>
               <tr>
                    <td class="colname"><span class="warn">*</span>油品种类:</td>
                    <td class="content">
						<select id="gas_type" name="GAS_TYPE">
							<option value="0# 柴油">0# 柴油</option>
						</select>
					</td>
               </tr>
               <tr>
                    <td class="colname"><span class="warn">*</span>体积:</td>
                    <td class="content" style="padding: 5px"><input class="txt" id="volume" name="VOLUME" placeholder="请输入地址" type="text"/></td>
               </tr>
               <tr>
                    <td class="submit" colspan="2" align="center">
                    	<input class="submit" type="submit" value="保  存"/>
					</td>
               </tr>
            </table>
		</ul>
	</form>
	</div>
	</div>
</body>
<script type="text/javascript">

	$(function(){
		$("#frmApp").validator({
			rules: {},
			fields: {
			    "#gasstation_id": "required",
			    "#tank_num": "required",
			    "#gas_type": "required",
			    "#volume": "required",
			},
			valid: function (form) {
				$.post(form.submit(),null,function(resq){
					var json = eval('('+resq+')');
					if(json.status == 0)
						alert(json.data);
				})
			},
			dataType:"json"
			});
		
		$.get("${pageContext.request.contextPath}/oil_web/tank!getGasstationList.do",null,function(resp){
			var json = eval("("+resp+")");
			$("#gasstation_id").html(json.data);
		})
	})
	
</script>
</html>
